local skill = fk.CreateSkill {
  name = "medkit_skill&",
  attached_equip = "medkit",
}

skill:addEffect("viewas", {
  anim_type = "support",
  pattern = "peach",
  prompt = "#medkit_skill",
  handly_pile = true,
  card_filter = function (self, player, to_select, selected)
    return #selected == 0 and Fk:getCardById(to_select).color == Card.Red and table.contains(player:getHandlyIds(), to_select)
  end,
  view_as = function (self, player, cards)
    if #cards ~= 1 then return nil end
    local c = Fk:cloneCard("peach")
    c.skillName = skill.name
    c:addSubcard(cards[1])
    return c
  end,
  enabled_at_play = function(self, player)
    return false
  end,
  enabled_at_response = function(self, player)
    return player.phase == Player.NotActive
  end,
})

Fk:loadTranslationTable{
  ["medkit_skill&"] = "急救包",
  [":medkit_skill&"] = "你回合外，你可以将一张红色手牌当【桃】使用。",
  ["#medkit_skill"] = "急救包：你可以将一张红色手牌当【桃】使用。",
}

return skill
